package com.robot.system.controller;

import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:TODO
 * @author:qzg
 * @Date:2020-12-04 16:07
 */
@RestController
@AllArgsConstructor
@RequestMapping("/tasks")
@Log4j2
public class taskController {

    @GetMapping
    public String listTasks(){
        log.info("11111111");
        return "任务列表";
    }

    @PostMapping
    public String newTasks(){
        return "创建了一个新的任务";
    }

    @PutMapping("/{taskId}")
    public String updateTasks(@PathVariable("taskId")Integer id){
        return "更新了一下id为:"+id+"的任务";
    }

    @DeleteMapping("/{taskId}")
    public String deleteTasks(@PathVariable("taskId")Integer id){
        return "删除了id为:"+id+"的任务";
    }
}
